//
//  HWAdvertisingQCTableViewCell.m
//  94hwanGame
//
//  Created by Chendaobin on 2019/8/22.
//  Copyright © 2019年 王治庭. All rights reserved.
//

#import "HWAdvertisingQCTableViewCell.h"



@interface HWAdvertisingQCTableViewCell()
@property (weak, nonatomic) IBOutlet UIImageView *icoimageView;
@property (weak, nonatomic) IBOutlet UIButton *jingriBut;

@property (weak, nonatomic) IBOutlet UILabel *jieshaoLabel;
@end

@implementation HWAdvertisingQCTableViewCell



- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    self.icoimageView.layer.cornerRadius = 5;
    self.icoimageView.layer.masksToBounds = YES;
    self.icoimageView.userInteractionEnabled = YES;
    
    UITapGestureRecognizer *tapGes = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(imgaetap)];
    [self.icoimageView addGestureRecognizer:tapGes];
    
    
    
    
}

- (void)imgaetap {
    
    NSLog(@"点击图片广告");
    
    HWGameDetailController *gameDetails =[[HWGameDetailController  alloc]init];
    
    gameDetails.gameId = self.model.id;
    
    [[HWViewUtils getCurrentVC].navigationController pushViewController:gameDetails animated:YES];
    
    
    
    
    
    
}





- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

-(void)setModel:(HWGameListModel *)model {
    
    _model = model;
    
    
    
    NSURL *url = [NSURL URLWithString:model.image];
    [self.icoimageView sd_setImageWithURL:url placeholderImage:nil];
    
    [self.jingriBut setTitle: [NSString stringWithFormat:@"%@",model.type] forState:UIControlStateNormal];    
    self.jieshaoLabel.text = [NSString stringWithFormat:@"%@",model.name];
    
    
    
    
    
}
@end
